<template>
    <div>
        <h1>我是App</h1>
        <h1>{{ userNum | splitNumsComma }}</h1>
        <h1>价格：{{ price1 | priceFormat(3) }}</h1>
    </div>
</template>

<script>
export default {
    name: "App",
    data() {
        return {
            userNum: 123148192481,
            price1: 10,
        };
    },
    filters: {
        splitNumsComma(value) {
            const reg = /(\d)(?=(\d{3})+$)/g;
            return String(value).replace(reg, "$1, ");
        },
    },
};
</script>

<style></style>
